package com.software.form.inquiryform.dao;

public class InquiryFormTransaction {
	private InquiryFormDao inquiryFormDao;

	public InquiryFormDao getInquiryFormDao() {
		return inquiryFormDao;
	}

	public void setInquiryFormDao(InquiryFormDao inquiryFormDao) {
		this.inquiryFormDao = inquiryFormDao;
	}
	
	public boolean add(String no,String shipper, String email, String departure,
			String dest,String cargo,String weight,String m3,String info){
		InquiryForm inf = new InquiryForm();
		inf.setNo(no);
		inf.setShipper(shipper);
		inf.setShipperEmail(email);
		inf.setDeparture(departure);
		inf.setDestination(dest);
		inf.setCargoName(cargo);
		inf.setWeight(weight);
		inf.setVolume(m3);
		inf.setExtraInfo(info);
		return inquiryFormDao.add(inf);
	}
	
	public InquiryForm getInquiry(String no){
		return inquiryFormDao.queryByNo(no);
	}
}
